package com.lixin.rabbitmq.controller;

import com.lixin.rabbitmq.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class OrderController {

    @Autowired
    OrderService orderService;

    @GetMapping("/fanout/order")
    public String create() {
        return orderService.create();
    }

    @GetMapping("/direct/order")
    public String directCreate() {
        return orderService.directCreate();
    }

    @GetMapping("/topic/order")
    public String topicCreate() {
        return orderService.topicCreate();
    }

}
